<template>
	<view>
		<view class="page">
			<comp-common v-bind="{data:data}" @getUserInfo="getUserInfo" @myLogin="myLogin" @getPhoneNumber="getPhoneNumber" @hideGetCoupon="hideGetCoupon" @closeCouponBox="closeCouponBox" @navigatorClick="navigatorClick"></comp-common>
			<comp-header v-bind="{data:data}" @relevanceError="relevanceError" @relevanceSuccess="relevanceSuccess"></comp-header>
			<view class="body after-navber">
				<view class="i-qrcode flex-row">
            <image @tap="click" class="img" :src="data.qrcode"></image>
        </view>
			</view>
			<comp-footer v-bind="{data:data}"></comp-footer>
		</view>
	</view>
</template>

<script>var myVue = {};
	import Vue from 'vue'
	var e = Vue.prototype.getApp;
	export default {
		data() {
			return {
				data: {
        qrcode: ""
    },
			};
		},
		onLoad: function(t) {myVue = this;
        e.page.onLoad(this, t);
        var o = this;
        myVue.getApp.core.getStorageSync(myVue.getApp.const.SHARE_SETTING);
        myVue.getApp.core.showLoading({
            title: "正在加载",
            mask: !0
        }), myVue.getApp.request({
            url: myVue.getApp.api.share.get_qrcode,
            success: function(e) {
                0 == e.code ? o.setData({
                    qrcode: e.data
                }) : o.getApp.core.showModal({
                    title: "提示",
                    content: e.msg,
                    showCancel: !1
                });
            },
            complete: function() {
                o.getApp.core.hideLoading();
            }
        });
    },
    onShow: function() {
        myVue.getApp.page.onShow(this);
        var e = this, t = myVue.getApp.getUser();
        e.setData({
            user_info: t
        });
    },
		methods: {
			click: function() {
        var e = this;
        uni.previewImage({
            current: e.data.qrcode,
            urls: [ e.data.qrcode ]
        });
    }
		},
	}
</script>

<style scoped>
.i-qrcode {
    width: 100%;
    height: 1200upx;
}

.i-qrcode .img {
    width: 100%;
    height: 100%;
    background-size: 100% 100%;
}
</style>
